<?php

$installer = $this;
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */

$installer->startSetup();

$installer->run("
DROP TABLE IF EXISTS {$this->getTable('searchseo/query')};
CREATE TABLE IF NOT EXISTS {$this->getTable('searchseo/query')} (
    `query_id` int(10) unsigned NOT NULL auto_increment,
    `query_text` varchar(255) NOT NULL default '',
    `num_results` int(10) unsigned NOT NULL default '0',
    `popularity` int(10) unsigned NOT NULL default '0',
    `redirect` varchar(255) NOT NULL default '',
    `title` varchar(255) NOT NULL default '', 
    `url` varchar(255) NOT NULL default '',
    `content` text,
    `creation_time` datetime default NULL,
    `update_time` datetime default NULL,
    `is_active` tinyint(1) NOT NULL default '1',
    `store_id` smallint (5) unsigned NOT NULL,
    PRIMARY KEY  (`query_id`)
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='seo query';
");
$installer->endSetup();

